﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ExpTop.ascx.cs" Inherits="Top" %>
<div runat="server" id="div_toolbar">
    <div class="btn_index" onclick="javascript:window.history.back(-1);">
        <span class="btn_index_span">返回</span>
    </div>
    <div id="indexPageDiv" class="btn_refresh">
        <span id="sendSpan" class="btn_refresh_span">首页</span></div>
   <div id="more" class="btn_refresh" onclick="showMoreMenu(event)">
        <span class="btn_refresh_span" style="padding-right:5px;">更多↓</span>
    </div>
    <div id="moreMenu" class="g_menu">
       <a href="ExpressSendNew.aspx"><div>新建专送件</div></a>
        <a href="ExpressList.aspx"><div>收到的专送件</div></a>
        <a href="ExpressSendList.aspx"><div>发送的专送件</div></a>
    </div>
    <div class="toolbar_pagename">
        <asp:Label ID="lbl_title" runat="server" Text=""></asp:Label></div>
</div>
<script type="text/javascript" src="js/checkUrl.js"></script>
<script type="text/javascript">
 
    function showMoreMenu(evt) {
        var menuDiv = document.getElementById("moreMenu");

        var leftX = document.body.clientWidth - 123;
        menuDiv.setAttribute("style", "left:" + leftX + "px");
        
        menuDiv.style.display = "block";
        evt.cancelBubble = true;
    }
    function hiddenMoreMenu() {
        var menuDiv = document.getElementById("moreMenu");
        if (menuDiv.style.display == "block" || menuDiv.style.display == "") {
            menuDiv.style.display = "none";
        }
    }
     function orientationChange() {

         hiddenMoreMenu();

     }
    
     window.onorientationchange = orientationChange;

     function u_load() {
         var indexDiv = document.getElementById("indexPageDiv");
         var indexSpan = document.getElementById("sendSpan");
         var currentUrl = window.location.href;
         //专送件新建页面
         if (contains(currentUrl.toString(), "ExpressSendNew", false)) {

             indexSpan.innerHTML = "发送";
             indexDiv.onclick = zsjSend;
         }
         else {
             indexDiv.onclick = function() {
                 window.location.href = "index.aspx";
             }
         }
     }
     function zsjSend() {
         var sendBtn = document.getElementById("zsjSend");
         sendBtn.onclick();
     }
     u_load();
</script>

